﻿using System;
using System.Collections.Generic;
using ShopB2C.Entity;
using ShopB2C.Enums;
using ShopB2C.Parameters;

namespace ShopB2C.ViewModels {
    /// <summary>
    /// 购买咨询参数传递类
    /// </summary>
    public class ConsultParameters {
        /// <summary>
        /// 每页显示记录数
        /// </summary>
        public int PageSize = 10;
        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex = 1;
        /// <summary>
        /// 总页数
        /// </summary>
        public int PageCount = 1;
        /// <summary>
        /// 总记录数
        /// </summary>
        public int RowsCount = 0;  
        /// <summary>
        /// 所属的对象 id
        /// </summary>
        public int ProductId = 0;
        /// <summary>
        /// 是否审核
        /// </summary>
        public bool? IsAudit = true;
        /// <summary>
        /// 用户 id
        /// </summary>
        public int Uid = 0;
        /// <summary>
        /// 搜索关键字
        /// </summary>
        public string Key = string.Empty;
    }    
    /// <summary>
    /// 购买咨询
    /// </summary>
    [Serializable]
    public class ConsultViewModel {
        /// <summary>
        /// 购买咨询
        /// </summary>
        public ConsultEntity Consult { get; set; }
        /// <summary>
        /// 分页实体
        /// </summary>
        public object Pager { get; set; }
        /// <summary>
        /// 分页
        /// </summary>
        public int PageNumber { get; set; }
        /// <summary>
        /// 总记录数
        /// </summary>
        public int RowsCount { get; set; }
        /// <summary>
        /// 购买咨询集合
        /// </summary>
        public List<ConsultEntity> ConsultList { get; set; }
        /// <summary>
        /// 图片路径
        /// </summary>
        public string ImageRoot { get; set; }
        /// <summary>
        /// 用户图标根文件夹
        /// </summary>
        public string UserFaceRoot { get; set; }
        /// <summary>
        /// 商品
        /// </summary>
        public ProductEntity Product { get; set; }
    }
}
